<template>
  <PullRefresh @refresh="updateItems">
    <div slot="pullRefreshSlot">
      <div class="morefollownewcontentpanel">
        <van-list
          v-model="loading"
          :finished="finished"
          :finished-text="$t('lang.已经到底了')"
          :error.sync="error"
          :error-text="this.$t('lang.请求失败，点击重新加载')"
          @load="onLoad"
          v-if="items.length > 0"
        >
          <TwoColumnList :items="items">
            <div slot="twoColumnItem" slot-scope="{ item }">
              <ColumnGroupItem :item="item" name="NEWCONTENT"></ColumnGroupItem>
            </div>
          </TwoColumnList>
        </van-list>
        <div v-else class="nodata">
          <NoContent :type="noContentType"></NoContent>
        </div>
      </div>
    </div>
  </PullRefresh>
  <!-- <van-pull-refresh
    v-model="isLoading"
    @refresh="onRefresh"
    :pulling-text="this.$t('lang.下拉即可刷新')"
    :loosing-text="this.$t('lang.释放即可刷新')"
    :loading-text="this.$t('lang.加载中')"
  >
    <div class="morefollownewcontentpanel">
      <van-list
        v-model="loading"
        :finished="finished"
        :finished-text="$t('lang.已经到底了')"
        :error.sync="error"
        :error-text="this.$t('lang.请求失败，点击重新加载')"
        @load="onLoad"
        v-if="items.length > 0"
      >
        <TwoColumnList :items="items">
          <div slot="twoColumnItem" slot-scope="{ item }">
            <ColumnGroupItem :item="item" name="NEWCONTENT"></ColumnGroupItem>
          </div>
        </TwoColumnList>
      </van-list>
      <div v-else class="nodata">
        <NoContent :type="noContentType"></NoContent>
      </div>
    </div>
  </van-pull-refresh> -->
</template>
<script>
export default {
  name: "MoreFollowNewContentPanel",
  props: {
    items: {
      type: Array,
      default() {
        return [];
      },
    },
  },
  data() {
    return {
      loading: false,
      finished: true,
      error: false,
      isLoading: false,
      noContentType: 10,
    };
  },
  components: {
    PullRefresh: () =>
      import(
        /* webpackChunkName:"pullRefresh" */ "../../components/common/pullRefresh.vue"
      ),
    NoContent: () =>
      import(
        /* webpackChunkName:"noContent" */ "../../components/common/noContent.vue"
      ),
    TwoColumnList: () =>
      import(
        /* webpackChunkName:"twoColumnList" */ "../../components/common/twoColumnList"
      ),
    ColumnGroupItem: () =>
      import(
        /* webpackChunkName:"columnGroupItem" */ "../../components/common/columnGroupItem"
      ),
  },
  methods: {
    updateItems(pageNum, callback) {
      this.$emit("updateItems", pageNum, callback);
    },
    onLoad() {},
  },
};
</script>
<style lang="less">
@base: 23.44rem;
.morefollownewcontentpanel {
  display: block;
  overflow: hidden;
}
</style>
